﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Xml.Serialization;

namespace OnlineEducation.Models.ServerAPIModels
{
    public class CreateMeeting
    {
        /// <summary>
        /// 会议名称 O
        /// </summary>
        public string name { get; set; }
        /// <summary>
        /// 会议唯一标识，必传字段 R
        /// </summary>
        public string meetingID { get; set; }
        /// <summary>
        /// 指定加入会议的密码
        /// </summary>
        public string attendeePW { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string moderatorPW { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string welcome { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string dialNumber { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string voiceBridge { get; set; }
        /// <summary>
        /// 最多的与会人数
        /// </summary>
        public int? maxParticipants { get; set; }
        /// <summary>
        /// 登出后跳转地址
        /// </summary>
        public string logoutURL { get; set; }
        /// <summary>
        /// 是否录屏
        /// </summary>
        public bool? record { get; set; }
        /// <summary>
        /// 会议最长时间
        /// </summary>
        public int? duration { get; set; }
        /// <summary>
        /// 是否分组讨论
        /// </summary>
        public int? isBreakout { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int? parentMeetingID { get; set; }
        /// <summary>
        /// 分组讨论的序列号
        /// </summary>
        public int? sequence { get; set; }
        /// <summary>
        /// 是否自由参加分组
        /// </summary>
        public int? freeJoin { get; set; }
        /// <summary>
        /// 不能直接使用,前端传递的值meta=meta_**=value1,meta_**2=value2
        /// </summary>
        public string meta { get; set; }
        /// <summary>
        /// 和Wellcome的参数类似
        /// </summary>
        public string moderatorOnlyMessage { get; set; }
        /// <summary>
        /// 第一个人进来后是否自动录屏，默认是false；autoStartRecording=false and allowStartStopRecording=false - 不能同时为false，同时为false，不能录屏
        /// </summary>
        public bool? autoStartRecording { get; set; }
        /// <summary>
        /// 允许录屏停止
        /// </summary>
        public bool? allowStartStopRecording { get; set; }
        public bool? webcamsOnlyForModerator { get; set; }
        public string logo { get; set; }
        public string bannerText { get; set; }
        public string bannerColor { get; set; }
        public string copyright { get; set; }
        /// <summary>
        /// true，当会议开始的时候，设置所有的用户都是静音
        /// </summary>
        public bool? muteOnStart { get; set; }
        /// <summary>
        /// 默认是false，设为true，允许会议的发言人不静音其他人
        /// </summary>
        public bool? allowModsToUnmuteUsers { get; set; }
        /// <summary>
        /// 默认是false，设为true，阻止其他人共享他们的摄像头
        /// </summary>
        public bool? lockSettingsDisableCam { get; set; }
        /// <summary>
        /// 默认false，设为true，只让听，不让发言
        /// </summary>
        public bool? lockSettingsDisableMic { get; set; }
        /// <summary>
        /// 默认false，设为true，在会议中不让私聊
        /// </summary>
        public bool? lockSettingsDisablePrivateChat { get; set; }
        /// <summary>
        /// 默认false，设为true，在会议中不允许聊天
        /// </summary>
        public bool? lockSettingsDisablePublicChat { get; set; }
        /// <summary>
        /// 默认true, 设为false，不会锁住用户
        /// </summary>
        public bool? lockSettingsLockedLayout { get; set; }
        /// <summary>
        /// 默认false，设为true的时候，将会允许lockSettingsLockOnJoin 设置
        /// </summary>
        public bool? lockSettingsLockOnJoinConfigurable { get; set; }
        /// <summary>
        /// Default guestPolicy=ALWAYS_ACCEP，其他ALWAYS_DENY, and ASK_MODERATOR.是否允许访客加入，主要是针对Join的API
        /// </summary>
        public string guestPolicy { get; set; }
        /// <summary>
        /// 会议结束后，bbb执行的回调
        /// </summary>
        public string meta_endCallbackUrl { get; set; }

    }

    public class CreateResponse
    {
        public CreateResponseEntity response { get; set; }
    }
    [XmlRoot(ElementName = "response")]
    public class CreateResponseEntity
    {

        public string returncode { get; set; }
        public string meetingID { get; set; }
        public string internalMeetingID { get; set; }
        public string parentMeetingID { get; set; }
        public string attendeePW { get; set; }
        public string moderatorPW { get; set; }
        public string createTime { get; set; }
        public string voiceBridge { get; set; }
        public string dialNumber { get; set; }
        public string createDate { get; set; }
        public string hasUserJoined { get; set; }
        public string duration { get; set; }
        public string hasBeenForciblyEnded { get; set; }
        public string messageKey { get; set; }
        public string message { get; set; }
    }
}
